﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Proyecto_XNA
{
    class Level
    {
        Sprite kSprite;

        Vector2 vPosition;
        Texture2D kTexture;
        Rectangle kPlayableRect;

        Player kPlayer;

        private Vector2 start;

        public Player Player
        {
            get { return kPlayer; }
        }

        Enemy kEnemy;

        public Enemy Enemy
        {
            get { return kEnemy; }
        }

        public int Score
        {
            get { return score; }
        }
        int score;

        bool reachedExit;

        public bool ReachedExit
        {
            get { return reachedExit; }
        }

        TimeSpan timeRemaining;

        public TimeSpan TimeRemaining
        {
            get { return timeRemaining; }
        }

        private const int PointsPerSecond = 5;

        ContentManager content;

        public ContentManager Content
        {
            get { return content; }
        }

        public void LoadMaps(ContentManager kContent)
        {
            
        }

        public Level()
        {

        }



        private void OnPlayerKilled(Enemy killedBy)
        {
            Player.OnKilled(killedBy);
        }

        private void OnExitReached()
        {
            Player.OnReachedExit();
            
            reachedExit = true;
        }

        public void StartNewLife()
        {
            Player.Reset(start);
        }

        private void UpdateEnemies(GameTime gameTime)
        {
           
        }
    }
}
